From 455c31d815547fce9fce509001ef7419063d4aa0 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Jan 2011 02:30:25 +0100 Subject: [PATCH] Make GtkColorButton use GtkStyleContext --- gtk/gtkcolorbutton.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 91e1427110..3fd11cbcb5 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -324,7 +324,13 @@ gtk_color_button_draw_cb (GtkWidget *widget, if (!gtk_widget_is_sensitive (GTK_WIDGET (color_button))) { - gdk_cairo_set_source_color (cr, >k_widget_get_style (GTK_WIDGET(color_button))->bg[GTK_STATE_INSENSITIVE]); + GtkStyleContext *context; + GdkRGBA color; + + context = gtk_widget_get_style_context (widget); + gtk_style_context_get_background_color (context, GTK_STATE_FLAG_INSENSITIVE, &color); + + gdk_cairo_set_source_rgba (cr, &color); checkered = gtk_color_button_get_checkered (); cairo_mask (cr, checkered); cairo_pattern_destroy (checkered); -- 2.30.2